

export function query(el) {
  if (typeof el === 'string') {
    const selected = document.querySelector(el)
    if (!selected) {
      return document.createElement('div')
    }
    return selected
  } else {
    return el
  }
}

export function toDom(template){
  const div = document.createElement('div')
  div.innerHTML  = template
  return div.children[0]
}